#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int fbn(int n)
{
	int i = 1;
	int a = 1;
	int shu = 0;
	if (n == 1)
		return 1;
	else if (n == 2)
		return 1;
	else
	{
		for (n; n > 2; n--)
		{
			shu = i + a;
			i = a;
			a = shu;
		}
	}
	return shu;
}
int main()
{
	int n = 0;
	scanf("%d", & n);
	int x = fbn(n);
	printf("%d", x);
	return 0;
}